<template>
  <div class="quasiDeclaration">
    <div id="realContent" class="real_content">
      <div class="analy_content">
        <div class="content-scroll-wrapper">
          <div class="scroll-list-wrap">
            <cube-scroll :data="data">
              <ul v-if="data&&!data.lenght" class="declare_table" id="declareTable">
                <li class="declare_table_title">
                  <div class="c1">企业名称</div>
                  <div class="c2">公布日期</div>
                  <div class="c3">辅导机构</div>
                </li>
                <li :key="index" v-for="(item,index) in data" class="declare_table_content">
                  <div class="c1">{{item.sShortName}}</div>
                  <div class="c2">{{item.sUpdateDate}}</div>
                  <div class="c3">{{item.sIntermediary}}</div>
                </li>
              </ul>
            </cube-scroll>
          </div>
        </div>
      </div>
    </div>
    <div v-if="data&&data.lenght" class="no_data" id="noData">暂无数据</div>
  </div>
</template>

<script>
import { getPreReportInfoDetail } from "../../api/declarationProgress.js";
export default {
  data() {
    return {
      data: null
    };
  },
  mounted() {
    this.getPreReportInfoDetail(this.$route.query.type);
  },
  methods: {
    async getPreReportInfoDetail(type) {
      if (!type) {
        return;
      }
      let data = await getPreReportInfoDetail(type);
      this.data = data.vtDetailPreReportInfo;
    }
  }
};
</script>

<style lang="scss" rel="stylesheet/scss" scoped>
.quasiDeclaration {
  .content-scroll-wrapper {
    .scroll-list-wrap {
      height: 100%;
      width: 100%;
      transform: rotate(0deg); // fix 子元素超出边框圆角部分不隐藏的问题
      position: absolute;
      top: 0;
      bottom: 0;
      overflow: hidden;
      .declare_table {
        li {
          display: flex;
          align-items: center;
          text-align: center;
          font-size: 16px;
          padding-right: 14px;
          padding-left: 14px;
          box-sizing: border-box;
          div {
            flex: 1;
          }
          .c1 {
            text-align: left;
          }
          .c3 {
            text-align: right;
          }
        }
        .declare_table_title {
          font-size: 16px;
          color: rgba(37, 37, 37, 0.6);
          background: #f7f7f7;
          width: 100%;
          height: 37px;
        }
        .declare_table_content {
          div {
            padding: 15px 0;
          }
        }
      }
    }
  }

  .no_data {
    text-align: center;
    padding: 40px 0;
    font-size: 14px;
    color: rgba(37, 37, 37, 0.6);
  }
}
</style>
